package com.ruoyi.erp.accounting.service.impl;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.erp.accounting.domain.Accounting;
import com.ruoyi.erp.accounting.mapper.AccountingMapper;
import com.ruoyi.erp.accounting.service.AccountingService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AccountingImpl implements AccountingService {
@Autowired
private AccountingMapper accountingMapper;

  @Override
  public List<Accounting> getAccountingList(Accounting accounting) {
    return accountingMapper.getAccountingList(accounting);
  }

  @Override
  public void insertAccounting(Accounting accounting) {
        accountingMapper.insertAccounting(accounting);
  }

  @Override
  public int deleteAccounting(String accountingGroup) {
    String [] accountingGroups = Convert.toStrArray(accountingGroup);
    return accountingMapper.deleteAccounting(accountingGroups);
  }

  @Override
  public void updateAccounting(Accounting accounting) {
    accountingMapper.uodateAccounting(accounting);
  }

  @Override
  public Accounting findAccounting(String accountingGroup) {
    return accountingMapper.findAccounting(accountingGroup);
  }


}
